<template>
	<view>
		<u-tabs :list="list1" :current="current" @click="click"></u-tabs>
		<view>
			<view v-for="(list,index) in lists" :key="index">
				<view v-if="list.id == current">
					<u-cell>
						<view slot="title">
							<view style="display: flex;">
								<view class="user-card" @touchstart="goDetial()">
									<view class="user-card-top">
										<image class="img" :src="list.url"></image>
										<view class="right">
											<view class="first-row">
												<text class="nickName">{{list.name}}</text>
												<text class="zhuan">{{ list.zhuan }}</text>
											</view>
											<view class="last-row">
												<text class="time">{{list.time}}</text>
											</view>
											
										</view>
									</view>
									<view class="user-card-bottom">
										<view class="tag-box">
											<view class='tag-item tag-item-blue' style="font-size: 30rpx;">{{list.note1}}</view>
											<view class='tag-item tag-item-orange' style="font-size: 30rpx;">{{list.note2}}</view>
											<view class='tag-item tag-item-green' style="font-size: 30rpx;">{{list.note3}}</view>
										</view>
									</view>
								</view>
							</view>
						</view>
					</u-cell>
				</view>
			</view>
		</view>
		<view class="release" @tap="goRelease">
			<text class="cuIcon-add"></text>
			<text>发布</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				current: '',
				lists: [{
						id: 0,
						name: '123',
						time: '2021-12-19 16:36',
						zhuan:'赚￥7.0',
						note1:'限女生',
						note2:'找人代买',
						note3:'待接单',
						url: '../../static/order/1.png'
					},
					{
						id: 1,
						name: '1234',
						time: '2021-12-19 16:36',
						zhuan:'赚￥2.0',
						note1:'限男生',
						note2:'外卖代取',
						note3:'待接单',
						url: '../../static/order/2.png'
					},
					{
						id: 2,
						name: '12345',
						time: '2021-12-19 16:36',
						zhuan:'赚￥5.5',
						note1:'限女生',
						note2:'找人陪跑',
						note3:'待接单',
						url: '../../static/order/3.png'
					},
					{
						id: 2,
						name: '54321',
						time: '2021-12-19 16:36',
						zhuan:'赚￥3.0',
						note1:'限女生',
						note2:'找人陪跑',
						note3:'待接单',
						url: '../../static/order/4.png'
					},
					{
						id: 3,
						name: '4321',
						time: '2021-12-19 16:36',
						zhuan:'赚￥2.0',
						note1:'限男生',
						note2:'找人代办',
						note3:'待接单',
						url: '../../static/order/5.png'
					},
					{
						id: 4,
						name: '321',
						time: '2021-12-19 16:36',
						zhuan:'赚￥1.5',
						note1:'限女生',
						note2:'找人代买',
						note3:'待接单',
						url: '../../static/order/6.png'
					}
				],
				list1: [{
						name: '找人代买',
					}, {
						name: '外卖代取',
					},
					{
						name: '找人陪跑',
					}, {
						name: '找人代办',
					}, {
						name: '快递代取',
					}]
			}
		},
		methods: {
			click(item) {
				console.log('item', item.index);
				this.current = item.index
			},
			goRelease() {
				uni.navigateTo({
					url: '/pages/fabu/fabu'
				});
			},
			goDetial() {
				uni.navigateTo({
					url: '/pages/orderdetial/orderdetial'
				});
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: #f8f8f8;
	}
	.user-card {
		background: #FFFFFF;
		border-radius: 20upx;
		width: 100%;
		
		.user-card-top {
			padding: 30upx;
			display: flex;
			border-bottom: 1upx solid #E6E6E6;
		
			.img {
				width: 100upx;
				height: 100upx;
				border-radius: 50%;
			}
		
			.right {
				flex: 1;
				margin-left: 20upx;
				padding-top: 14upx;
				padding-bottom: 14upx;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
		
				.first-row {
					display: flex;
					justify-content: space-between;
		
					.nickName {
						font-size: 28upx;
						font-weight: bold;
						color: #333333;
					}
					.zhuan {
						font-size: 28upx;
						font-weight: bold;
						color: #ff0000;
						padding-right: 40rpx;
					}
		
					.icon-wrap {
						display: flex;
						margin-top: -18upx;
		
						image {
							width: 44upx;
							height: 44upx;
							margin-left: 20upx;
						}
					}
				}
		
				.last-row {
					font-size: 24upx;
					font-weight: 500;
					color: #666666;
					display: flex;
					align-items: center;
		
					.line {
						margin: 0 10upx;
					}
				}
			}
		}
		
		.user-card-bottom {
			padding: 30upx;
		
			.first-row {
				display: flex;
				justify-content: space-between;
		
				.tit {
					font-size: 32upx;
					font-weight: 800;
					color: #333333;
				}
		
				.zhuan {
					font-size: 28upx;
					font-weight: 800;
					color: #FF3530;
				}
			}
		
			.tag-box {
				display: flex;
				margin-top: 20upx;
		
				.tag-item {
					display: inline-block;
					height: 38upx;
					line-height: 38upx;
					border-radius: 5upx;
					padding: 0 13upx;
					margin-right: 10upx;
				}
		
				.tag-item-blue {
					background: #D9EDFF;
					color: #66A6FF;
				}
		
				.tag-item-orange {
					background: #FFE8D9;
					color: #FF7D26;
				}
		
				.tag-item-pink {
					background: #FFD9D9;
					color: #FF6666;
				}
		
				.tag-item-green {
					background: #D9FFFB;
					color: #17D2BD;
				}
			}
		}
	}
	.release {
		width: 120upx;
		height: 120upx;
		border-radius: 50%;
		background-color: #FF3630;
		color: #fff;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		position: fixed;
		right: 5%;
		bottom: 15%;
		z-index: 100;
	
		.cuIcon-add {
			font-size: 38upx;
			font-weight: bold;
		}
	}
</style>
<!--<template>
	<view class="container">
		<view>
			<u-tabs :list="list" :is-scoll="true" :current="current" @click="click" active-color=" #FF3630"
				bar-height="15" bar-width="40">
			</u-tabs>
			<view>
				<pay :lists="lists" :current="current" />
			</view>
		</view>
		
		<view class="release" @tap="goRelease">
			<text class="cuIcon-add"></text>
			<text>发布</text>
		</view>
	</view>
</template>

<script>
	import task1 from "@/components/task/task1.vue"
	import task2 from "@/components/task/task2.vue"
	import task3 from "@/components/task/task3.vue"
	export default {
		components: {
			task1,
			task2,
			task3
		},
		data() {
			return {
				task1: 'task1',
				task2: 'task2',
				task3: 'task3',
				currentView: 'task1' // 默认选中第一项
			};
		},
		methods: {

		},
	}
</script>

<style lang="scss">
	page {
		width: 100%;
	}

	.release {
		width: 120upx;
		height: 120upx;
		border-radius: 50%;
		background-color: #FF3630;
		color: #fff;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		position: fixed;
		right: 5%;
		bottom: 15%;
		z-index: 100;

		.cuIcon-add {
			font-size: 38upx;
			font-weight: bold;
		}
	}
</style>-->
